package com.bee.bootstrap.formDesign.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.bee.bootstrap.formDesign.entity.FormRecord;
import com.bee.common.core.result.Result;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liekkas
 * @since 2018-08-26
 */
public interface IFormRecordService extends IService<FormRecord> {

    Result addFormRecord(FormRecord formRecord);

    Result findOneFormRecordData(Long formRecordId);

    Result findFormRecordAndData(Long templateId,Page<FormRecord>page,String formRecordQuery);

    /**
     * <pre>
     *     删除表单记录同时删除记录的表单数据
     * </pre>
     * @param id
     * @return
     */
    Result deleteFormRecordCascade(Long id);

    /**
     * <pre>更新表单数据</pre>
     * @param formRecord
     * @return
     */
    Result updateFormReocrdAndData(FormRecord formRecord);
}
